

#include "serverdata.h"



void CFileServerData::ClearServerData()
{	
	memset(m_apServerInst,0,sizeof(m_apServerInst));

	
}



CFileServerData::CFileServerData()
{
	ClearServerData();
}



CFileServerData::~CFileServerData()
{
	ClearServerData();

}

void CFileServerData::SetServerFileRoot(char * pRoot,u8 uRootLen)
{
	memcpy(m_achFileRoot,pRoot,min(uRootLen,MAX_FILEROOT_LEN));
	m_achFileRoot[MAX_FILEROOT_LEN -1 ] = '\0';
}

char* CFileServerData::GetServerFileRoot()
{
	return m_achFileRoot;
}

void CFileServerData::PushSaveFile(const FileSaveDownNode& filenode)
{
	m_qFilesToSave.push(filenode);
}

const FileSaveDownNode CFileServerData::PopSaveFile()
{
	FileSaveDownNode node = m_qFilesToSave.front();
	m_qFilesToSave.pop();
	return node;
}